1. Field of the Invention
This invention relates to computer systems and, more particularly, to methods for expediting the operation of graphics accelerators in rendering figures when using a move-draw language.
2. History of the Prior Art
There have be a number of examples of the use of move-draw languages in the prior art. Some dedicated graphics terminals such as the IBM 5080 and the Tektronix Graphics Terminal have used move-draw languages. The SGI Graphics Library includes move-draw processes.
The best known move-draw language is Postscript. Postscript is a computer language which has been developed to enable the precise and complete description and printing of graphic elements by computers. Postscript is widely used in providing printed graphics through advanced laser printers. For a number of reasons including its facility in providing very accurate graphics output images, implementations and improvements of Postscript and similar languages are being utilized for more general purposes in providing computer applications.
Postscript is a move-draw language, one whose commands direct an output device to either move from an initial point to a second point without drawing between the initial point and the second point, or to draw a straight line or curve segment from an initial point to a second point. Postscript also allows a figure rendered in this manner to be filled or left empty. Thus, by designating move or draw commands and the set of coordinates for each of a number of connected points defining a figure, any desired figure may be rendered.
Normally a process in a move-draw language defining a figure to be rendered is written as a set of instructions; in Postscript and in this description this set of instruction is called a path. A path begins with the move command, an X coordinate of a first point of the figure, and a Y coordinate of the first point of the figure. The path continues with a draw command, an X coordinate of a second point of the figure, and a Y coordinate of the second point of the figure. The path continues with draw commands each having an associated set of coordinates for a related point until all of the points defining the connected points of the figure have been joined. Disconnected elements to be described are indicated by another sequence of move, draw, draw, . . . commands. A path may contain an arbitrary number of such sequences.
It will be appreciated by those skilled in the art that the time required by a computer or by any processor implementing the process will be substantial for complicated figures, the figures for which this language was specifically designed.
Certain processors, for example, co-processors and graphics accelerators implement particular drawing algorithms which are designed to render often used figures more rapidly than they can be rendered by the step-by-step plodding through the complete path process. For example, certain graphics accelerators implement fast algorithms which are designed to rapidly produce vectors, triangles, and quadrilaterals given only the coordinates of the points defining the particular figures and a definition of the figure being rendered. Such graphics accelerators may also provide means for rapidly repeating a figure which is to be rendered a plurality of times whether to produce individual or composite figures. A particular graphics accelerator of this type is described in U.S. patent application Ser. No. 07/297,590, entitled APPARATUS AND METHOD FOR LOADING COORDINATE REGISTERS FOR USE WITH A GRAPHICS SUBSYSTEM UTILIZING AN INDEX REGISTER, Priem and Malachowsky, filed Jan. 3, 1989, and assigned to the assignee of this invention, now abandoned.
Unfortunately, when these co-processors and graphics accelerators are presented a process written in a move-draw language format such as that described, they treat the path process as a list of individual instructions. This occurs because these move-draw languages do not define the figure to be rendered in a format such that the devices may make use of their fast algorithms; consequently, the graphics devices slowly traverse through the path process to render the output. Since the figures themselves are not described by the move-draw languages in a manner to allow the use of the fast algorithms, it is axiomatic that the number of times a figure is to be repeated is not described by these languages.
It is possible to translate from the move-draw language format to a format which the particular graphics device can understand in utilizing its internal algorithms to obtain accelerated rendering of figures. For example, such a translation might cause the device to count the number of vertices of a figure to determine whether a particular algorithm might be used. However, this translation in itself is normally sufficiently time consuming that no overall increase in speed is obtained. Moreover, such translation may well be individual to the particular graphics devices so that individual processes would need to be prepared for each graphics device to be utilized.